﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp5
{
    public  class TestEventDemo
    {
        public event Action TestEvent;
        public TestEventDemo()
        {
            TestEvent += TestEventDemo_TestEvent;
        }

        private void TestEventDemo_TestEvent()
        {
            Console.WriteLine("testevent");
        }
        public void Test()
        {
            TestEvent?.Invoke();
        }
    }
}
